import json
import os
os.environ["TAVILY_API_KEY"] = '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'

from langchain_tavily import TavilySearch

tool = TavilySearch(
    max_results=5,
    topic="general",
    # include_answer=False,
    # include_raw_content=False,
    # include_images=False,
    # include_image_descriptions=False,
    # search_depth="basic",
    # time_range="day",
    # include_domains=None,
    # exclude_domains=None
)
resp = tool.invoke({"query": "俄罗斯与乌克兰的战况如何？"})
results = resp['results']
print(json.dumps(results, ensure_ascii=False, indent=4))
